summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@peacefrogs.net>2012-09-05 19:14:50 +0200
committerÉtienne Loks <etienne.loks@peacefrogs.net>2012-09-05 19:14:50 +0200
commite13516c39f072c3b1c99fc37eb1881e7279f0d92 (patch)
tree64c3afa207392a47a49e4fc00c8fbc466bdbc191
parentf7180eaa05a165ce60b8b346c734e2a2547097a7 (diff)
downloadChimère - projet Saclay-e13516c39f072c3b1c99fc37eb1881e7279f0d92.tar.bz2
Chimère - projet Saclay-e13516c39f072c3b1c99fc37eb1881e7279f0d92.zip
Add a link bar at the bottom of left panel
-rw-r--r--local_settings.py.sample2
-rw-r--r--settings.py1
-rw-r--r--static/saclay/css/styles-saclay.css44
-rw-r--r--static/saclay/js/interface.js16
-rw-r--r--templates/chimere/blocks/actions.html6
-rw-r--r--templates/chimere/blocks/news.html2
-rw-r--r--templates/chimere/blocks/submited.html1
-rw-r--r--templates/chimere/default_extra_page.html2
-rw-r--r--templates/chimere/detail.html2
-rw-r--r--templates/chimere/main_map.html6
10 files changed, 58 insertions, 24 deletions
diff --git a/local_settings.py.sample b/local_settings.py.sample
index 58ce4e0..c4f6cc8 100644
--- a/local_settings.py.sample
+++ b/local_settings.py.sample
@@ -29,3 +29,5 @@ DATABASES = {
CHIMERE_ENABLE_ROUTING = True
ROOT_URLCONF = 'chimere_saclay.urls'
+
+CONTACT_EMAIL = ''
diff --git a/settings.py b/settings.py
index 32f6d95..a51ab78 100644
--- a/settings.py
+++ b/settings.py
@@ -15,6 +15,7 @@ PROJECT_NAME = u'Chimère'
ROOT_PATH = os.path.realpath(os.path.dirname(__file__)) + "/"
EMAIL_HOST = 'localhost'
+CONTACT_EMAIL = ''
STATIC_URL = '/static/'
STATIC_ROOT = ROOT_PATH + 'static/'
diff --git a/static/saclay/css/styles-saclay.css b/static/saclay/css/styles-saclay.css
index d3b6384..1d0afc8 100644
--- a/static/saclay/css/styles-saclay.css
+++ b/static/saclay/css/styles-saclay.css
@@ -48,7 +48,7 @@ body, h2, #content,
}
/* alternative background */
-.no-titlebar h2,
+.no-titlebar h2, #footer-panel,
ul#multimedia_list_content li, #welcome .footer,
#chimere_itinerary_content div.n, #action,
div.cloud h4, #detail_footer, .sidebar-handler:hover,
@@ -74,7 +74,7 @@ h3{
* Borders
*/
ul#multimedia_list_content li,
-.itinerary_label .label,
+.itinerary_label .label, #footer-panel,
#detail_footer, div.cloud h4,
#areas, #detail, #main-map, div.warning,
#content, .action li.selected, .sidebar-handler,
@@ -119,7 +119,7 @@ h4{
font-weight:bold;
}
-/* no title bar dialog*/
+/* no title bar dialog */
.no-titlebar.ui-dialog .ui-dialog-titlebar{
background:none;
@@ -161,6 +161,27 @@ h4{
padding:0 1em;
}
+#dialog-title{
+ position:absolute;
+ font-size:1.5em;
+ top:10px;
+}
+
+.no-titlebar .ui-dialog-content.ui-widget-content{
+ position:static;
+}
+.dialog-content{
+ overflow:auto;
+}
+
+.dialog-content, .no-titlebar .ui-dialog-content{
+ margin-top:10px;
+}
+
+.dialog-content .content{
+ padding:1em;
+}
+
#welcome_message{
padding:0;
margin:0;
@@ -372,11 +393,21 @@ div#panel{
max-height:none;
padding:0;
right:auto;
- bottom:0;
+ bottom:26px;
top:34px;
border-top-width:0;
}
+#footer-panel{
+ text-align:center;
+ padding:0.2em;
+ bottom:0;
+ position:absolute;
+ width:277px;
+ height:22px;
+ border-right:1px solid;
+}
+
.sidebar-handler{
height:30px;
width:18px;
@@ -555,11 +586,6 @@ div.cloud h4{
display:none;
}
-.dialog-content{
- overflow:auto;
- height:450px;
-}
-
.small-gallery{
width:auto;
}
diff --git a/static/saclay/js/interface.js b/static/saclay/js/interface.js
index 017d480..a9aed41 100644
--- a/static/saclay/js/interface.js
+++ b/static/saclay/js/interface.js
@@ -1,7 +1,8 @@
$(function(){
$('#default-message').dialog({'autoOpen':false,
'resizable':false,
- 'width':$(window).width()-500});
+ width:630,
+ 'dialogClass':'no-titlebar'});
var update_editmarker = function(){
$('#action-edit-event').removeClass('ui-state-active');
@@ -68,7 +69,9 @@ $(function(){
}
});
};
-
+ $("#action-news").click(function(){
+ $('#news').dialog('open');
+ });
$("#action-carte").click(function(){
$("#main-map").chimere('activateContextMenu');
if($("#itinerary_field").html()){
@@ -104,12 +107,9 @@ $(function(){
$.ajax({url: url,
dataType: "html",
success: function (content) {
- $('#default-message').html("<div class='dialog-content'>"+
- content+"</div>");
- dialog_title = $("#default-message #dialog-title");
- $('#default-message').dialog('option', 'title',
- dialog_title.html());
- dialog_title.remove();
+ html = "<div class='dialog-content'>" +
+ content + "</div>"
+ $('#default-message').html(html);
$('#default-message').dialog('open');
}
});
diff --git a/templates/chimere/blocks/actions.html b/templates/chimere/blocks/actions.html
index b13c5db..7c9e47d 100644
--- a/templates/chimere/blocks/actions.html
+++ b/templates/chimere/blocks/actions.html
@@ -12,10 +12,8 @@
<li id='action-news' class='ui-widget ui-button ui-state-default ui-corner-all'>
{% trans "News" %}
</li>
- {% for action, subactions in actions %}{% if forloop.counter0 > 3 %}
- <li class='ui-widget ui-button ui-state-default ui-corner-all {% ifequal action.id action_selected.0 %} ui-state-active{% endifequal %}'>
- <a class='dyn-page' href='{{action.url}}'>{{ action.label }}</a>
+ <li class='ui-widget ui-button ui-state-default ui-corner-all'>
+ <a class='dyn-page' href='{% url chimere:extra_page "" "project"%}'>{% trans "The project" %}</a>
</li>
- {% endif %}{% endfor %}
</ul>
</div>
diff --git a/templates/chimere/blocks/news.html b/templates/chimere/blocks/news.html
index e791758..11d33c6 100644
--- a/templates/chimere/blocks/news.html
+++ b/templates/chimere/blocks/news.html
@@ -5,7 +5,7 @@ $(function(){
$('#news div.media-player').jmeEmbedControls();
$('#news video').each(function(index){$(this).pause()});
$('#news audio').each(function(index){$(this).pause()});
- $("#news").dialog({width:600, dialogClass:'no-titlebar',
+ $("#news").dialog({width:630, dialogClass:'no-titlebar',
autoOpen:false});
});
</script>
diff --git a/templates/chimere/blocks/submited.html b/templates/chimere/blocks/submited.html
index a000fc0..3220beb 100644
--- a/templates/chimere/blocks/submited.html
+++ b/templates/chimere/blocks/submited.html
@@ -15,6 +15,7 @@ est d'accord avec ce type de distribution.</p>
$("#submited-window").dialog({
title:"{% trans "Thank you for your contribution to the project!" %}",
modal: true,
+ dialogClass:'no-titlebar',
beforeClose: function() {
window.location = "{{index_url}}";
}
diff --git a/templates/chimere/default_extra_page.html b/templates/chimere/default_extra_page.html
index aa098eb..cd1ab60 100644
--- a/templates/chimere/default_extra_page.html
+++ b/templates/chimere/default_extra_page.html
@@ -1,2 +1,4 @@
<h4 id='dialog-title'>{{title}}</h4>
+<div class='content'>
{{content|safe}}
+</div>
diff --git a/templates/chimere/detail.html b/templates/chimere/detail.html
index 13b2231..c54188e 100644
--- a/templates/chimere/detail.html
+++ b/templates/chimere/detail.html
@@ -79,7 +79,7 @@
$('html').addClass('js-on');
$(function(){
$("#gallery-{{marker.pk}}").dialog({title:"{{marker.name}}", autoOpen: false,
- height: "auto", width: "auto"});
+ height: "auto", width: "auto", dialogClass:'no-titlebar'});
$('div.media-player').jmeEmbedControls();
$('.tabs').tabs({
select: function(event, ui) {
diff --git a/templates/chimere/main_map.html b/templates/chimere/main_map.html
index af40f24..e008f6a 100644
--- a/templates/chimere/main_map.html
+++ b/templates/chimere/main_map.html
@@ -10,7 +10,6 @@
<script src="{{ STATIC_URL }}saclay/js/SaclayCloud.js"></script>
<script src="{{ STATIC_URL }}saclay/js/jquery.form.js"></script>
-
<script type='text/javascript' language='javascript'>
var default_error_message = "{% trans "Error while loading the page... Refresh the page. If the problem persist contact the webmaster." %}";
var edit_url = "{% url edit %}";
@@ -62,6 +61,11 @@
</div>
</div>
</div>
+ <div class='footer' id='footer-panel'>
+ {% if contact_email %}<a href='mailto:{{contact_email}}' id='contactus'>{% trans "Contact us" %}</a> - {% endif %}
+ <a href='{% url chimere:extra_page '' 'legal' %}' id='page-legal' class='dyn-page'>{% trans "Terms of service" %}</a> -
+ <a href='{% url chimere:extra_page '' 'credit' %}' id='page-credit' class='dyn-page'>{% trans "Credits" %}</a>
+ </div>
{% endblock %}
{% block content %}
<div class='sidebar-handler' id='sidebar-handler-show'>